<form id="form1" name="form1" method="post" action="">
  <label>
  <select name="lbparent" id="lbparent" onChange="this.form.submit()">
    <option value="NULL">Chọn Danh Muc</option>
     
    <?php
	foreach($this->session as $value)
	{	
	?>
     <option value="<?php echo $value[idTL]; ?>"
     <?php
	 if($_REQUEST['lbparent']==$value[idTL])
	 	echo 'selected="selected"';
	 ?>
     
     >
	 <?php echo $value[TenTL];?></option>
     
     <?php }?>
  </select>
  </label>
  </form>
  <?php if(count($this->category)||$this->tmp==1)
  {
  
  ?>
  <form id="form3" name="form3" method="post" action="">

 <table width="100%" border="0" cellspacing="2" cellpadding="3">
  <tr id="titleuser">
    <td>Mã loaisp</td>
    <td>Loại sản phẩm</td>
    <td><label>
      <input type="checkbox" name="chkall" id="chkall" />
    </label></td>
  </tr>
  <?php 
  foreach($this->category as $value)
	{
	?>
  <td><?php echo $value[idLoai]; ?></td>
    <td><?php echo $value[TenLoai]; ?></td>
    <td><label>
      <input type="checkbox" name="chk[]" id="chk[]" value= "<?php echo $value[idLoai].'|'.$value['TenLoai'].'|'.$value['idTL'].'|'.$value['keywork']; ?>"/>
      <input type="hidden" name="hid[]" id="hid[]" value="<?php echo $value[idLoai];?>" />
      <input type="hidden" name="hidses" id="hidses" value="<?php echo $value[idTL];?>" />
    </label></td>
  </tr>
  <?php 
  }
  ?>
</table>

<label>
<input type="submit" name="btnadd" id="btnthem" value="Them" 
onClick="form3.action='<?php echo $this->url(array("action"=>"addcategory"));?>';form3.submit()" />
</label>
<label>
<input type="submit" name="btnsua" id="btnsua" value="Sửa" 
onClick="form3.action='<?php echo $this->url(array("action"=>"editcategory"));?>';form3.submit()" />
</label> 
<label>
<input type="submit" name="btnxoa" id="btnxoa" value="Xoa"
onClick="form3.action='<?php echo $this->url(array("action"=>"deletecategory"));?>';form3.submit()" />
</label>

</form>
  <?php 
  }
  ?>